<%@page import="fr.uniscol.model.BaseAnneeScolaire"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>



<c:forEach items="${enseignant.services}" var="service">
${service}
<button type="button" class="btn btn-primary btn-xs" onclick="javascript:location='<c:url value="devoir.create?serviceid=${service.id}" />'">Nouveau devoir</button>
<table id="tableDevoirs" class="table table-striped table-hover">
    <thead>
        <tr>
            <th>Service</th>
            <th>Intitulé</th>
            <th>Coefficient</th>
            <th>Date</th>
            <th>
            </th>
        </tr>
    </thead>
    <tbody>
        <c:forEach items="${devoirs}" var="dev">
        <tr>
            <td>${dev.service}</td>
            <td>${dev.intitule}</td>
            <td>${dev.coefficient}</td>
            <td>TODO</td>
            <td>
                <button type="button" class="btn btn-primary btn-xs" onClick="javascript:editScolarite(${eleve.id}, ${sco.id})" />Modifier</button>
                <button type="button" class="btn btn-primary btn-xs" onClick="javascript:deleteScolarite(${eleve.id}, ${sco.id})">Supprimer</button>
            </td>
        </tr>
        </c:forEach>
    </tbody>
</table>
<hr/>
</c:forEach>
